<template>
  <div class="reservation">
    <header-top>
      <a class="header_left" slot="left" @click="$router.back()">
        <img src="../../../assets/images/icon_fanhui.png"/>
      </a>
      <a class="header_center" slot="center">
        <span>预约</span>
      </a>
    </header-top>
    <div class="reservation_content_list">
      <div class="reservation_content reservation_content_first">
        <flexbox>
          <flexbox-item>
            <div class="reservation_content_item">
              <p class="reservation_content_item_p1">美发店</p>
              <p class="reservation_content_item_p2">经典龙华店</p>
            </div>
          </flexbox-item>
        </flexbox>
        <p class="line"/>
        <flexbox>
          <flexbox-item>
            <div class="reservation_content_item">
              <p class="reservation_content_item_p1">美发套餐</p>
              <p class="reservation_content_item_p2">￥35 洗剪吹1次，男女不限，发长不限</p>
            </div>
          </flexbox-item>
        </flexbox>
        <p class="line"/>
        <flexbox>
          <flexbox-item :span="10">
            <div class="reservation_content_item">
              <p class="reservation_content_item_p1">发型师</p>
              <p class="reservation_content_item_p2">诸葛亮</p>
            </div>
          </flexbox-item>
        </flexbox>
        <p class="line"/>
        <flexbox>
          <flexbox-item>
            <div style=" margin: 10px 0 10px 15px;">
              <p class="reservation_content_item_p1">到店时间</p>
              <div class="reservation_content_weektime">
                <flexbox>
                  <flexbox-item style="margin-left: 10px !important;" :class="{weektime_item_active:day==1}"
                                @click.native="day=1">
                    <div class="reservation_content_weektime_item">
                      <p>今天</p>
                      <p>04-26</p>
                      <p class="weektime_item_active_p" v-show="day==1"></p>
                    </div>
                  </flexbox-item>
                  <img src="../../../assets/images/bg_fengexian2.png" style="height: 36px;"/>
                  <flexbox-item :class="{weektime_item_active:day==2}" @click.native="day=2">
                    <div class="reservation_content_weektime_item">
                      <p>明天</p>
                      <p>04-27</p>
                      <p class="weektime_item_active_p" v-show="day==2"></p>
                    </div>
                  </flexbox-item>
                  <img src="../../../assets/images/bg_fengexian2.png" style="height: 36px;"/>
                  <flexbox-item :class="{weektime_item_active:day==3}" @click.native="day=3">
                    <div class="reservation_content_weektime_item">
                      <p>周二</p>
                      <p>04-28</p>
                      <p class="weektime_item_active_p" v-show="day==3"></p>
                    </div>
                  </flexbox-item>
                  <img src="../../../assets/images/bg_fengexian2.png" style="height: 36px;"/>
                  <flexbox-item :class="{weektime_item_active:day==4}" @click.native="day=4">
                    <div class="reservation_content_weektime_item">
                      <p>周三</p>
                      <p>04-29</p>
                      <p class="weektime_item_active_p" v-show="day==4"></p>
                    </div>
                  </flexbox-item>
                  <img src="../../../assets/images/bg_fengexian2.png" style="height: 36px;"/>
                  <flexbox-item :class="{weektime_item_active:day==5}" @click.native="day=5">
                    <div class="reservation_content_weektime_item">
                      <p>周四</p>
                      <p>04-30</p>
                      <p class="weektime_item_active_p" v-show="day==5"></p>
                    </div>
                  </flexbox-item>
                  <img src="../../../assets/images/bg_fengexian2.png" style="height: 36px;"/>
                  <flexbox-item :class="{weektime_item_active:day==6}" @click.native="day=6">
                    <div class="reservation_content_weektime_item">
                      <p>周五</p>
                      <p>05-01</p>
                      <p class="weektime_item_active_p" v-show="day==6"></p>
                    </div>
                  </flexbox-item>
                  <img src="../../../assets/images/bg_fengexian2.png" style="height: 36px;"/>
                  <flexbox-item :class="{weektime_item_active:day==7}" @click.native="day=7">
                    <div class="reservation_content_weektime_item">
                      <p>周六</p>
                      <p>05-02</p>
                      <p class="weektime_item_active_p" v-show="day==7"></p>
                    </div>
                  </flexbox-item>
                </flexbox>
              </div>
            </div>
          </flexbox-item>
        </flexbox>
        <flexbox :gutter="0">
          <flexbox-item>
            <div class="reservation_content_time ">
              <div class="hairdresser_discount_package_item" :class="{active:time==1}" @click="time=1">
                <p>上午</p>
                <p>09:00-12:00</p>
              </div>
            </div>
          </flexbox-item>
          <flexbox-item>
            <div class="reservation_content_time">
              <div class="hairdresser_discount_package_item" :class="{active:time==2}" @click="time=2">
                <p>中午</p>
                <p>14:00-18:00</p>
              </div>
            </div>
          </flexbox-item>
          <flexbox-item>
            <div class="reservation_content_time">
              <div class="hairdresser_discount_package_item" :class="{active:time==3}" @click="time=3">
                <p>晚上</p>
                <p>18:00-22:00</p>
              </div>
            </div>
          </flexbox-item>
        </flexbox>
        <p class="line"/>
        <flexbox>
          <flexbox-item>
            <div style=" margin: 10px 15px;">
              <p class="reservation_content_item_p1">通过发现APP预约即送什么东西</p>
              <p class="reservation_content_item_p2">
                <x-button type="primary" @click.native="$router.push('/reservationsuccess')">生成预约码</x-button>
              </p>
            </div>
          </flexbox-item>
        </flexbox>
      </div>
    </div>
  </div>
</template>

<script>
  import {Flexbox, FlexboxItem, XButton} from 'vux'
  import HeaderTop from '../../../components/HeaderTop/HeaderTop'

  export default {
    name: "Reservation",
    components: {
      HeaderTop,
      Flexbox,
      XButton,
      FlexboxItem
    },
    data() {
      return {
        day: 1,
        time: 1
      }
    }
  }
</script>

<style scoped>
  .reservation {
    overflow-y: hidden;
  }

  .reservation_content_list {
    margin-top: 58px;
    margin-bottom: 10px;
  }

  .active {
    background-color: #ff6633;
    color: #fff !important;
    border: none !important;
  }

  .weektime_item_active {
    color: #ff6633;
  }

  .weektime_item_active_p {
    width: 110%;
    height: 5px;
    background: #ff6633;
    position: relative;
    bottom: -10px;
  }

  .reservation_content {
    margin: 0 10px;
    background-color: #fff;
    border: 1px solid #ffdccd;
    border-radius: 3px;
  }

  .reservation_content_first {
    border-top-left-radius: 0;
    border-top-right-radius: 0;
  }

  .reservation_content_item {
    margin: 10px 0 10px 15px;
    height: 40px;
  }

  .reservation_content_item_p1 {
    font-size: 14px;
    color: #a0a0a0;
  }

  .reservation_content_item_p2 {
    font-size: 16px;
    color: #333333;
    margin-top: 10px;
  }

  .reservation_content_time {
    margin: 10px 15px;
    text-align: center;
    font-size: 14px;
    line-height: 20px;
    vertical-align: middle;
    text-align: center;
  }

  .hairdresser_discount_package_item {
    border: 1px solid #ccc;
    color: #333;
    border-radius: 3px;
    height: 40px;
  }

  .reservation_content_weektime {
    margin: 10px 15px 0 0;
    background-color: #fff;
    border: 1px solid #ffdccd;
    border-radius: 3px;
    height: 48px;
  }

  .reservation_content_weektime_item {
    font-size: 12px;
    vertical-align: middle;
    text-align: center;
    display: table-cell;
    height: 48px;
  }

</style>
